//
//  ChannnelControllerScrollView.h
//  ChannelCommonComponent
//
//  Created by LiuLian on 14-2-18.
//  Copyright (c) 2014年 LiuLian. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ChannelDataSource.h"
#import "ChannelControllerScrollViewDelegate.h"

typedef enum {
    ScrollViewVisibleStateCurrent=0,
    ScrollViewVisibleStateBefore,
    ScrollViewVisibleStateNext
}ScrollViewVisibleState;    //用户当前所见View

typedef enum {
    ScrollViewMoveStateSlow=0,
    ScrollViewMoveStateFast
}ScrollViewMoveState;       //滑动状态

@interface ChannnelControllerScrollView : UIScrollView <UIScrollViewDelegate>

@property (nonatomic, strong) NSMutableArray *child;
@property (nonatomic, weak) id<ChannelControllerScrollViewDelegate> channelDelegate;

@property (nonatomic, assign) ScrollViewVisibleState visibleState;
@property (nonatomic, assign) NSInteger beforeIndex;
@property (nonatomic, assign) NSInteger currentIndex;
@property (nonatomic, assign) NSInteger nextIndex;

@property (nonatomic, assign) CGFloat directionX;
@property (nonatomic, assign) NSInteger lastCurrentIndex;

- (id)initWithDataSource:(ChannelDataSource *)data;

@end
